// 分类列表请求
import { homeCategoryHead } from '@/api/home'

// 购物车状态
export default {
  namespaced: true,
  state: () => {
    return {
      list: []
    }
  },
  mutations: {
    setList (state, data) {
      state.list = data
    }
  },
  actions: {
    //   分类列表请求
    async findList (store) {
      const { result } = await homeCategoryHead()
      store.commit('setList', result)
    }
  }
}
